local DrawHelp = true
local DrawSwap = false
local HelpText = {"Press F1 Fermer/Ouvrir le Menu",
"Press F2 Lache votre arme actuelle",
"Press F3 Commencer la partie",
"Press F3 En jeu , Basculer dans l'autre Team",
"Press F4 Spectateur"}
local HelpText2 = {"Les Gardiens doivent garder les Prisonniers",
"Les Prisonniers doivent suivrent les ordres",
"Ils peuvent essayer de se rebeller ou de s'enfuir",
"Si ils le font les Gardiens peuvent les abattres"}
local ysz = 94
local ysz2 = 84

local function ToggleHelp()
	DrawHelp = not DrawHelp
end
concommand.Add("gj_help", ToggleHelp)

local function ToggleSwap(um)
	DrawSwap = um:ReadBool()
	LocalPlayer():EmitSound("buttons/button3.wav")
end
usermessage.Hook("WishSwap", ToggleSwap)

function DrawHUD()
	if DrawHelp then
		draw.RoundedBox( 10, 32, 32, 250, ysz, Color(0, 0, 0, 200) )
		draw.SimpleText( "Menu GJail", "DefaultBold", 52, 40, Color(255, 0, 0), 0, 3 )
		local y = 0
		for _,txt in pairs(HelpText) do
			draw.SimpleText( txt, "Default", 44, 54+y, Color(255, 255, 255), 0, 3 )
			y = y + 12
		end

		draw.RoundedBox( 10, 32, ysz+64, 250, ysz2, Color(0, 0, 0, 200) )
		draw.SimpleText( "But du jeu :", "DefaultBold", 52, ysz+32+40, Color(255, 0, 0), 0, 3 )
		local y = 0
		for _,txt in pairs(HelpText2) do
			draw.SimpleText( txt, "Default", 44, ysz+32+54+y, Color(255, 255, 255), 0, 3 )
			y = y + 12
		end
	end
	if DrawSwap then
		draw.RoundedBox( 4, ScrW()-32-110, ScrH()-116-16, 110, 16, Color(0, 0, 0, 200) )
		draw.SimpleText( "You are in SwapList", "Default", ScrW()-32-55, ScrH()-116-15, Color(0, 255, 0), 1, 3 )
	end
	local Team = LocalPlayer():Team()
	draw.RoundedBox( 4, ScrW()-32-110, ScrH()-96-16, 110, 16, Color(0, 0, 0, 200) )
	draw.SimpleText( team.GetName(Team), "Default", ScrW()-32-55, ScrH()-96-15, team.GetColor(Team), 1, 3 )
end
hook.Add("HUDPaint", "GJail_DrawHUD", DrawHUD)